<?php 
$zebra=0;
$oldPeriode = false;
if ($data->num_rows() > 0):
	foreach($data->result_array() as $ch):
?>
	<?php if ($oldPeriode != date('F-Y',strtotime($ch['rank_periode']))):?>
	<?php $oldPeriode = date('F-Y',strtotime($ch['rank_periode']))?>
	<tr>
		<td colspan="5" class="notification"><?php echo $oldPeriode?></td>
	</tr>
	<?php endif?>
	<tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?> 
		onmouseover="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','visible')"
		onmouseout="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','hidden')">
	<td><?php echo $ch['kary_id']?></td>
	<td><?php echo $ch['kary_nama']?></td>
	<td><?php echo $ch['rank_point']?></td>
	<td><?php echo $ch['rank_ranking']?></td>
	<td align="right" width="10%">
		<input class="buttonSmall" type="button" style="font-size: 14px; visibility:hidden;" value="!" 
			onclick="do_drillRank('<?php echo $ch['kary_id']?>')" />
	</td>
	</tr>
<?php 
	endforeach;
else:
?><tr><td align="center" colspan="6">Tidak ada data</td></tr><?php 
endif;